﻿<%@ Page Language="C#" %>

<%@ Import Namespace="wojilu" %>
<%@ Import Namespace="wojilu.View" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Domain" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Service" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>#{softtitle}</title>
<link href="#{path.css}ybb/css/baselist.css?v=#{cssVersion}" rel="stylesheet" type="text/css" />
<link href="#{path.css}ybb/css/all.css?v=#{cssVersion}" rel="stylesheet" type="text/css" />
<link href="#{path.css}ybb/css/formdiv.css?v=#{cssVersion}" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="#{path.js}ybb/js/jquery.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/swfupload.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/swfuploaddb.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/batupfile.js?v=#{jsVersion}"></script>
<script type="text/javascript" language="JavaScript">
    var filemanage_js_upfile_zoomsize = "_{filemanage_js_upfile_zoomsize}";
    var filemanage_js_upfile_driname_err = "_{filemanage_js_upfile_driname_err}";
    var filemanage_js_upfile_ok = "_{filemanage_js_upfile_ok}";
    var filemanage_js_upfile_no = "_{filemanage_js_upfile_no}";
    var fheight = "#{fheight}";
	$(window).load(function(){
		var h = parseInt(fheight);
		$('#mainwindowhidden').css({height:h-39});
	});
	$(function(){
		$('#swfupload-control').each(function(){
			$(this).swfupload({

			    upload_url: "#{batupfilesave}?path=#{path}&filetype=#{filetype}&ybb_admininfo=#{ybb_admininfo}&ybb_powerlist=#{ybb_powerlist}",

			    file_size_limit: "#{maxfile}",

			    file_types: "#{upfile_pictype}",

				file_types_description : "All Files",

				file_upload_limit: "#{maxselect}",

				flash_url: "#{path.js}ybb/js/swfupload.swf",

				button_image_url: '#{path.js}ybb/js/upfilebotton.png',
				button_width : 116,
				button_height : 27,
				button_placeholder : $('.button', this)[0],
				debug: false
			});
		});
	});
	function saveResponse(options){
		if (options=='true'){
			alert(filemanage_js_upfile_ok);
		}else{
			alert(options);
		}
	}
	document.oncontextmenu=new Function('event.returnValue=false;');
	document.onselectstart=new Function('event.returnValue=false;');
</script>
<!--[if IE 6]>
<style type="text/css" media="screen">
body { behavior:url("templates/css/csshover.htc");}
</style>
<![endif]-->
</head>

<body class="bodyflow">
<input type="hidden" name="maxupfile" value="#{maxselect}"/>
<div class="centerrightwindow" id="swfupload-control">
    <%var filetype = v.data("filetype").ToString(); %>
	<div id="mainwindowhidden">
		<%if(filetype == "img"){ %>
		<div id="select" class="windowselecttop">
			<select size="1" name="amid" id="amid">
				<option value="0">_{filemanage_file_upfile_amid_option}</option>
                <%var list = v.data("list") as List<Album_Images>; %>
				<%foreach(var row in list){ %>
				<option value="<%=row.Id %>"><%=row.title %></option>
				<%} %>
			</select>
            <%var img_iswater = Convert.ToInt32(v.data("img_iswater")); %>
			<select size="1" name="img_iswater" id="img_iswater">
				<option value="0"<%if(img_iswater ==0){ %> selected="selected" <%} %>>_{filemanage_file_upfile_img_iswater0}</option>
				<option value="1"<%if(img_iswater ==1){ %> selected="selected" <%} %>>_{filemanage_file_upfile_img_iswater}</option>
				<option value="2"<%if(img_iswater ==2){ %> selected="selected" <%} %>>_{filemanage_file_upfile_img_iswater2}</option>
			</select>
		</div>
		<%} %>
		<div class="suggestion">
			<span class="sugicon"><span class="strong colorgorning2">_{position_title}</span><span class="padding-left5 colorgorningage">_{filemanage_file_upfile_type_mess}#{upfile_pictype_str}，_{filemanage_file_upfile_dirname_mess}#{maxfile2}，_{filemanage_file_upfile_maxfile_mess}#{maxselect} 个</span></span>
		</div>
		<div class="sugtitle-line"></div>
		<div class="listitle">
			<table border="0" width="100%" bordercolor="#FFFFFF">
				<tr>
					<td width="70%">文件名</td>
					<td width="20%">上传状态</td>
					<td width="10%">_{mangerlist_text_set}</td>
				</tr>
			</table>
		</div>
		<div class="loadingdiv" id="log"></div>
	</div>
	<div id="downbotton">
		<div id="subbotton">
			<table border="0" width="100%">
				<tr id="bottonsubmit">
					<td id="center">
						<table border="0" style="margin: 0 auto;">
							<tr>
								<td><input type="button" class="button"/></td>
								<td style="padding:0 5px 0 5px;"><input type="submit" name="Submit" id="submitbotton" value="_{botton_upfile}" class="buttonface" title="_{botton_upfile}"/></td>
								<td><input type="reset" name="reset" onClick="javascript:parent.resetwindow();" id="release" value="_{botton_upfile_reset}" class="buttonface"  title="_{botton_upfile_reset}" /></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</div>
	</div>
</div>
</body>
</html>